package com.ruoyi.mobile.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("material_info")
@ApiModel(value="MaterialInfoEntity对象", description="资料信息表")
public class MaterialInfoEntity implements Serializable {
    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "所属年级")
    private Integer grade;

    @ApiModelProperty(value = "所属科目")
    private Integer subject;

    @ApiModelProperty(value = "所属年份")
    private Integer age;

    @ApiModelProperty(value = "所属学期")
    private Integer semester;

    @ApiModelProperty(value = "资料名称")
    private String materialName;

    @ApiModelProperty(value = "所属地域")
    private String region;

    @ApiModelProperty(value = "版本")
    private String version;
    private String collection;

    @ApiModelProperty(value = "资料上传地址")
    private String url;

    @ApiModelProperty(value = "是否免费")
    private Integer isFree;

    @ApiModelProperty(value = "收费金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "分销比率")
    private BigDecimal discount;

    @ApiModelProperty(value = "分销梯度比率")
    private BigDecimal discountBl;

    @ApiModelProperty(value = "浏览量")
    private Long readNum;

    @ApiModelProperty(value = "下载量")
    private Long downNum;

    @ApiModelProperty(value = "上传用户ID")
    private Long userId;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;
}
